Many configuration expressions only affect the current property and therefore are limited in what they can do in a single statement, particularly with respect to other properties and objects. This is adequate for most customization but can be inadequate for advanced customization. In such situations, the programmer must usually define a separate function to perform the necessary actions and call that function from the configuration expression. The function is often a common one that is called from multiple configuration expressions. However, determining the context that the function is running in can then require much code. The CurrentPropertyName property helps with this.
The CurrentPropertyName property is globally available. That is, it is independent from the current configuration expression but it is always related to the current property that is affected by the calling expression.
The CurrentPropertyName property is available from the following property definition options:
The CurrentPropertyName property is available from the following property panel options:
For example, in a scenario where the properties that require input vary depending on the user's group memberships, the configuration expressions of all of the affected properties could contain an expression like IsPropertyRequired("SomeProperty") where IsPropertyRequired is a custom function and the property name that is passed to the function is specified in each expression. Except for the property name, the same expression is used for every property. Within the IsPropertyRequired function, a Select statement or similar construct can compare the property name that is passed with logic to fetch the user's group memberships and return True or False depending on the organization's business rules.
By using the CurrentPropertyName property, the expression can be simplified to eliminate the property name. The IsPropertyRequired function can retrieve the current property name from the CurrentPropertyName property. The rest of the function definition could work the same as before.
Related concepts
Understanding the Meridian Enterprise Script Editor
Understanding the Microsoft Script Debugger
Understanding configuration expressions
Understanding the Meridian object model
Understanding the Meridian functions
Understanding Meridian event procedures
Understanding automation objects
Understanding object arguments
Understanding VBScript and the Meridian Web Client
Related tasks
Understanding the effects of custom scripting
Related information
Formatting text with RTF codes